package com.hmdp.utils;

import java.time.LocalDateTime;

public interface ILock {
/*
* 尝试获取锁
* @parm timeOutSec锁持有的时间,过期后自动删除
*return true 获取锁成功, return false 获取锁失败
* */

    boolean tryLock(long timeOutSec);


    /*
    * 释放锁
    * */
    void unLock();

}
